public with sharing class CharacterCounter {

    public String message { get; set; }

    public PageReference count() {
        message=''+myTextArea .length();
        System.debug('##### Length:= ' +myTextArea .length());
                System.debug('@@@@@ message:= ' +message);
        return null;
    }


    public String myTextArea { get; set; }
}